class MemInfo
  def initialize()
    @mem_info = Hash.new
    meminfo = IO.readlines("/proc/meminfo")
    meminfo.each do |line|
      fields = line.split(' ')
      field_name = fields[0].strip.sub(/:/, '')
      field_value = fields[1].strip.to_f/1024.0
      @mem_info[field_name] = field_value
    end
  end
end

